<template>
    <div>
        <h1>子组件接收的值是：{{ parentMsg }}</h1>
        <button @click="sendToParent">点击传递数据到父组件</button>
        陈浩南：<button @click="sendMsg">发消息</button>
    </div>
</template>

<script>
    import bus from './eventBus.js'
    export default {
        props: ["parentMsg"],
        components: {

        },
        data(){
            return {
               number:90,
               msg:'今晚八点，老地方集合'
            }
        },
        methods: {
            sendToParent(){
                this.$emit("send",this.number);
            },
            sendMsg(){
                bus.$emit("biu",this.msg);
            }
        }
    }
</script>

<style>

</style>